package main

import (
	"context"
	"fmt"
	_ "gf_demo_v2/internal/packed"
	"gf_demo_v2/service"

	"github.com/gogf/gf/v2/os/gctx"
)

var ctx context.Context

func Test1(ctx context.Context) {
	t1 := service.NewImlOrmBusiness()
	sql := fmt.Sprintln("SELECT * FROM test")
	ret, res := t1.QueryAll(ctx, sql)
	if ret == 1 {
		for _, v := range res {
			if v["Name"]  != nil {
				fmt.Printf("Name:%s\n", v["Name"].(string))
			}
		}
	}
}
func main() {
	ctx = gctx.New()
	Test1(ctx)
	// var (
	// 	ctx = gctx.New()
	// )
	// if err := cmd.Main.Run(ctx); err != nil {
	// 	g.Log().Fatal(ctx, err)
	// }
}
